home *** CD-ROM | disk | FTP | other *** search
- Path: the-fly.zip.com.au!not-for-mail
- From: stuartm@zip.com.au (Stuart Mackinnon)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Q: Scrolling a Window
- Date: 27 Mar 1996 01:05:31 GMT
- Organization: Very Little
- Message-ID: <4ja48r$hva@the-fly.zip.com.au>
- References: <4j5r2n$566@ousrvr3.oulu.fi> <Pine.LNX.3.91.960326113409.12997A-100000@mix.hsv.no>
- NNTP-Posting-Host: zipper.zip.com.au
- X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]
-
- Leonard Faanes (shoeless@mix.hsv.no) wrote:
- > On 25 Mar 1996, Timo Karjalainen wrote:
- >
- > > I'm wondering what would be the best way to scroll a screen-size
- > > non-superbitmap window. The screen might be HUGE, i.e. the window
- > > might be HUGE. From what I see in the AutoDocs, ScrollLayer() is
- > > of use only for SuperBitMaps. (I do have GZZ.)
- > >
- > > In fact there are prop gadgets in the borders and I should scroll
- > > the window contents as the user plays with the gads.
- >
- > 1. Do NOT use GZZ Windows. That kind of 'two-layer' window should
- > NEVER (I really mean NEVER) be used. If you need to clip various drawing
- > routines to your borders, use a clip-region. However, it seems like
- > (out of your question) that you don't really need that clipping.
- >
- > 2 If >=V39 use ScrollWindowRaster() (This one got a bug with backfill
- > hooks and damage regions, but don't worry about that)
- > If <V39 use ScrollRaster() or ClipBlit().
-
- In fact it would probably be best to do ScrollRaster() AND ClipBlit().
- Refer to the "Optimised Window Refreshing" AmigaMail article to
- understand why it is best to use both. Basically you use ScrollRaster()
- to do the blit, then set the write mask to 0 and use ClipBlit() to
- scroll the damage areas. Then set the write mask back to what it was.
-
- The reason for this is that ClipBlit() does its blit and then does
- a second blit to clear the area that was scrolled in. ScrollRaster()
- does not do this - which is OK, cause you will probably be rendering
- over the top of that area anyway. But ScrollRaster will not deal
- with damage regions properly, so you have to use ClipBlit() with a
- mask of 0 (so that is doesn't actually blit anything) to scroll the
- damage regions.
-
- Both these functions use RastPorts as arguments, not bitmaps, which
- should mean that the OS will take care of any multple blits required
- for a really wide or tall RastPort.
-
- Don't use GZZ. Firstly it uses a LOT more CHIP ram, and is much slower
- on window moves and resizes. The only reason anyone would EVER need to
- use a GZZ window is if they want GadTools gadgets clipped to the
- window border (GadTools seems to screw around with clipping regions
- such that they are ignored during any GadTools gadget rendering).
-
- Regards,
-
- Stuart MacKinnon.
- --
-
- +- Stuart MacKinnon ------------------------------------ stuartm@zip.com.au -+
- | VIC20, CBM 128+1571, A1000+Sidecar, CD32, A4000/040+A4091+A2065+RetinaZ3! |
- | Registered BeBox Developer - for those at the bleeding edge. |
- | PHONE: +61 2 398 4578 (AH) +61 2 693 0445 (BH) |
- +--- Aztec C - Use it to MANXimise code inefficiency! -----------------------+
-